package com.jeff.tianti.controller;

import com.jeff.tianti.cms.entity.FriendShipLink;
import com.jeff.tianti.cms.service.FriendShipLinkService;
import com.jeff.tianti.common.PageBean;
import com.jeff.tianti.common.dto.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/link")
@CrossOrigin(maxAge = 3600)
public class FriendShipLinkController {
    @Autowired
    FriendShipLinkService friendShipLinkService;

    /**
     * 获取 友联列表
     *
     * @return
     */
    @RequestMapping(value = "/list", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public AjaxResult index() {
        List<FriendShipLink> friendShipLinkList = friendShipLinkService.getAll();
        return AjaxResult.setSuccessData(friendShipLinkList);
    }


}
